Decoding device, decoding method, and program

ABSTRACT

A decoding device including a decoding unit which decodes encoded data, an inverse orthogonal transformation unit which performs inverse orthogonal transformation for the encoded data and obtains a time series waveform element in a unit of blocks, a correlation calculation unit which obtains a correlation between a time series waveform element of a block arranged immediately before an error block which is a block in which an error has occurred during decoding by the decoding unit and a time series waveform element of a block arranged a predetermined number of blocks before the block, a cycle calculation unit which obtains a basic cycle of a block unit of the error block based on the correlation obtained by the correlation calculation unit, and a generation unit which generates a substitute signal of the time series waveform element of the error block.

BACKGROUND

The present disclosure relates to a decoding device, a decoding method,and a program, and particularly to a decoding device, a decoding method,and a program which are designed to easily generate substitute signalshaving little incompatibility when an error occurs during decoding.

From the past, there has been an encoding device which overlaps audiosignals of adjacent blocks, and performs orthogonal transformation andencoding for the signals. A decoding device, which decodes encoded datagenerated in such an encoding device, performs inverse orthogonaltransformation, and outputs audio signals, generates substitute signalsfor the purpose of masking an error when the error occurs during thedecoding.

As a method of generating the substitute signals, for example, there isa method in which a pitch cycle is obtained and substitute signals aregenerated from past decoding signals based on the pitch cycle (refer to,for example, Japanese Unexamined Patent Application Publication(Translation of PCT Application) Nos. 2002-542518 and 2002-542519).

In the method of generating substitute signals disclosed in JapaneseUnexamined Patent Application Publication (Translation of PCTApplication) Nos. 2002-542518 and 2002-542519, an automated correlationbetween a decoding signal immediately before an error occurs and a pastdecoding signal traced back from the foregoing decoding signal by apredetermined number of samples is obtained for each of thepredetermined number of samples, and a predetermined number of sampleswhen the automated correlation becomes the maximum value is obtained asa pitch cycle.

SUMMARY

In the above-described method, however, a large number of arithmeticoperations are necessary to obtain the pitch cycle. Particularly, when asampling frequency is high, the range of the number of samplescorresponding to an assumed range of the pitch cycle is wide, and thus,the number of arithmetic operations for obtaining the pitch cyclebecomes large. Accordingly, it was difficult to generate substitutesignals having little incompatibility from past decoding signals basedon the pitch cycle.

It is desirable to make generation of substitute signals having littleincompatibility easy when an error occurs during decoding.

According to an embodiment of the present disclosure, there is provideda decoding device including a decoding unit which decodes encoded dataobtained after audio signals of adjacent blocks are overlapped, undergoorthogonal transformation, and encoded, an inverse orthogonaltransformation unit which performs inverse orthogonal transformation forthe encoded data that has been decoded by the decoding unit and obtainsa time series waveform element in a unit of blocks, a correlationcalculation unit which obtains a correlation between a time serieswaveform element of a block arranged immediately before an error blockwhich is a block in which an error has occurred during decoding by thedecoding unit and a time series waveform element of a block arranged apredetermined number of blocks before the block, a cycle calculationunit which obtains a basic cycle of a block unit of the error blockbased on the correlation obtained by the correlation calculation unit,and a generation unit which generates a substitute signal of the timeseries waveform element of the error block using the time serieswaveform element of the block arranged forward from the error block by abasic cycle of the block unit based on the basic cycle obtained by thecycle calculation unit.

A decoding method and a program according to another embodiment of thedisclosure correspond to the decoding device of the embodiment of thedisclosure.

According to still another embodiment of the disclosure, encoded data isdecoded, which is obtained after audio signals of adjacent blocks areoverlapped, undergo orthogonal transformation, and encoded, the encodeddata that has been decoded undergoes inverse orthogonal transformationto obtain a time series waveform element in a unit of blocks, acorrelation between a time series waveform element of a block arrangedimmediately before an error block which is a block in which an error hasoccurred during decoding and a time series waveform element of a blockarranged forward from the block by a predetermined number of blocks isobtained, a basic cycle of a block unit of the error block is obtainedbased on the correlation, the time series waveform element of the blockarranged forward from the error block by a basic cycle of the block unitis generated based on the basic cycle as a substitute signal of the timeseries waveform element of the error block.

According to still another embodiment of the disclosure, the decodingdevice may be an individual device, or an internal block constitutingone device.

According to still another embodiment, when an error occurs duringdecoding, it is possible to easily generate a substitute signal withlittle incompatibility.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing a configuration example of anembodiment of a decoding device to which the disclosure is applied;

FIG. 2 is a diagram illustrating an MDCT spectrum;

FIG. 3 is a diagram showing a time series signal when an error occursduring new decoding;

FIG. 4 is a diagram illustrating correction of a basic cycle of a blockunit;

FIG. 5 is a diagram illustrating correction of the basic cycle;

FIG. 6 is a diagram showing the time series signal when an error doesnot occur;

FIG. 7 is a flowchart illustrating a decoding process of the decodingdevice of FIG. 1;

FIG. 8 is a flowchart illustrating a substitute waveform elementgeneration process of FIG. 7 in detail; and

FIG. 9 is a block diagram showing a configuration example of anembodiment of a computer.

DETAILED DESCRIPTION OF EMBODIMENTS Embodiment [Configuration Example ofEmbodiment of Decoding Device]

FIG. 1 is a block diagram showing a configuration example of anembodiment of a decoding device to which the disclosure is applied.

The decoding device 10 of FIG. 1 is configured by a demultiplexer 11, aparameter parser 12, a spectrum decoder 13, an IDCT (Inverse DiscreteCosine Transform) transformer 14, a window function multiplier 15, aswitch 16, an adder 17, a counter controller 18, a memory 19, acorrelation calculator 20, an evaluation calculator 21, a cycle adjustor22, and a gain adjustor 23. The decoding device 10 decodes encoded dataobtained as a result of the fact that audio signals that are time seriessignals of adjacent blocks are overlapped, and subjected to orthogonaltransformation and to encoding.

Specifically, the demultiplexer 11 of the decoding device 10 receivespackets of encoded data through a circuit not shown in the drawing, orthe like. The demultiplexer 11 performs demultiplexing for the receivedpackets of the encoded data and extracts the encoded data. At thismoment, the demultiplexer 11 detects the occurrence of a loss or anerror in the packets, and sets errFlag indicating occurrence andnon-occurrence of an error during decoding to be supplied to the switch16, the adder 17, and counter controller 18, and the correlationcalculator 20 according to the detection result. In addition, when theoccurrence of a loss or an error in the packets is not detected, thedemultiplexer 11 supplies the extracted encoded data to the parameterparser 12.

The parameter parser 12 extracts an encoded spectrum of audio signalsfrom the encoded data supplied from the demultiplexer 11 in a unit ofblocks. At this moment, the parameter parser 12 detects the occurrenceof an extraction error, and sets errFlag to be supplied to the switch16, the adder 17, the counter controller 18, and the correlationcalculator 20 according to the detection result. In addition, when theoccurrence of an extraction error is not detected, the parameter parser12 supplies the extracted encoded spectrum in a unit of blocks to thespectrum decoder 13.

The spectrum decoder 13 decodes the encoded spectrum of a unit of blockssupplied from the parameter parser 12. The spectrum decoder 13 suppliesk (0≦k≦NB−1) MDCT spectra X_(J)(k) of J-th block obtained from theresult to the IDCT transformer 14. Furthermore, NB is the length of ablock, and the number of sample blocks, that is, the value of ½ of atransform block length NT.

The IDCT transformer 14 and the window function multiplier 15 functionas inverse orthogonal transforming units, and perform a part of IMDCT(Inverse Modified Discrete Cosine Transform) for the MDCT spectraX_(J)(k) supplied from the spectrum decoder 13. Specifically, the IDCTtransformer 14 performs IDCT for the MDCT spectra X_(J)(k) supplied fromthe spectrum decoder 13 and supplies time series signal obtained fromthe result to the window function multiplier 15.

The window function multiplier 15 multiplies the time series signalssupplied from the IDCT transformer 14 by a window function in theinverse direction, and supplies the time series signal of the unit ofblocks obtained from the result to the switch 16 and the memory 19 as awaveform element y_(1,J)(i) (0≦i≦2NB−1) of a J-th block.

The switch 16 selects the waveform element y_(1,J)(i) (0≦i≦2NB−1)supplied from the window function multiplier 15 or a substitute waveformelement y′_(1,J) that is a substitute signal of half of the waveformelement of the J-th block supplied from the gain adjustor 23 accordingto the errFlag supplied from the demultiplexer 11 and supplies theresult to the adder 17.

The adder 17 adds half the waveform element y_(1,J) or the substitutewaveform element y′_(1,J) among the waveform element y_(1,J)(i)(0≦i≦2NB−1) supplied from the switch 16 or half a waveform elementy_(1,J−1) of one previous block or a substitute waveform elementy′_(1,J−1) stored in the memory 19. The adder 17 attenuates the additionresult based on errFlag supplied from the demultiplexer 11 and theparameter parser 12 and errCnt supplied from the counter controller 18.In other words, the adder 17 suppresses amplitude of the addition resultbased on the errFlag and errCnt. The adder 17 outputs and supplies timeseries signals y obtained from the result to cause the memory 19 tostore the result.

The counter controller 18 sets errCnt according to the errFlag suppliedfrom the demultiplexer 11 and the parameter parser 12, and supplies theerrCnt to the adder 17.

The memory 19 functions as a storage unit, and stores at least theclosest N (N is an integer) waveform elements y_(1,J)(i) (0≦i≦2NB−1)supplied from the window function multiplier 15 and the substitutewaveform element y′_(1,J) of half a block supplied from the gainadjustor 23. Furthermore, the memory 19 may store the waveform elementsy_(1,J)(i) (0≦i≦2NB−1) or the substitute waveform element y′_(1,J) ofhalf a block without change, and may store them in a state of beingcompressed in a compressed format such as logarithmic compression, orthe like.

In addition, the memory 19 stores a basic cycle n₀ such as a pitch cyclein a unit of blocks supplied from the evaluation calculator 21, and adeviation amount D₀ and a ratio m₀ for adjusting the basic cycle, whichis supplied from the cycle adjustor 22. Furthermore, the memory 19stores the time series signal y supplied from the adder 17.

The correlation calculator 20 reads from the memory 19 the former halfof a waveform element in a prior block to a block in which an erroroccurs during decoding and the former half of a waveform element in ablock arranged n (1≦n≦N) blocks before the prior block based on theerrFlag supplied from the demultiplexer 11 and the parameter parser 12.In addition, the correlation calculator 20 obtains a correlation valueC_(n) between the former half of the waveform element in the prior blockto the block in which the error occurs during decoding and the formerhalf of the waveform element in the block arranged n blocks before theprior block for each n, and supplies the result to the evaluationcalculator 21.

The evaluation calculator 21 calculates for each n an evaluation valueEv(n) of a block arranged n blocks before a prior block to the block inwhich an error occurs during decoding based on the correlation valueC_(n) supplied from the correlation calculator 20. The evaluationcalculator 21 determines n when the evaluation value Ev(n) becomes themaximum value among N evaluation values Ev(n) as the basic cycle n₀ in aunit of blocks of the block in which an error occurs during decoding,and supplies the result to the memory 19 and the cycle adjustor 22. Inaddition, the evaluation calculator 21 supplies the evaluation valueEv(n₀) and the correlation value C_(n0) to the cycle adjustor 22.

The cycle adjustor 22 corrects the basic cycle n₀ of a block unit ton₀/m₀ based on the basic cycle n₀ of a block unit, the evaluation valueEv(n₀) and the correlation value C_(n0) supplied from the evaluationcalculator 21, and the waveform element of half a block stored in thememory 19. In addition, the cycle adjustor 22 obtains a deviation amountD₀ of the basic cycle of a block in which an error has occurred duringdecoding from a cycle of a block based on the basic cycle n₀ of a blockunit, the correlation value C_(n0), and the waveform element and thetime series signal stored in the memory 19. The cycle adjustor 22supplies the ratio m₀ of the basic cycle n₀/m₀ of a block unit aftercorrection to the basic cycle n₀ of a block unit before correction andthe deviation amount D₀ of the basic cycle from the cycle of a block tothe memory 19.

The gain adjustor 23 reads the basic cycle n₀ of a block unit, the ratiom₀, and the deviation amount D₀ from the memory 19. In addition, thegain adjustor 23 functions as a generation unit, and obtains half awaveform element of a block arranged n₀/m₀+D₀ blocks before the block inwhich an error has occurred during decoding based on the basic cycle n₀of a block unit, the ratio m₀, and the deviation amount D₀. The gainadjustor 23 generates the substitute waveform element y′_(1,J) of half ablock by amplifying the obtained waveform element of the half block andsupplies the result to the memory 19 and the switch 16.

[Description of MDCT Spectrum]

FIG. 2 is a diagram illustrating the MDCT spectrum X_(J)(k).

As shown in FIG. 2, the MDCT spectrum X_(J)(k) is subjected toorthogonal transformation so that audio signals of adjacent blocksoverlap. Specifically, in the MDCT, the former half of a time seriessignal x(i+J·NB) (0≦i≦NB−1) of a J-th block overlaps with the latterhalf of a time series signal x(i+(J−1)·NB) (NB≦i≦2NB−1) of a J−1-thblock arranged one block before. In addition, the latter half of thetime series signal x(i+J·NB) (NB≦i≦2NB−1) of the J-th block overlapswith the former half of a time series signal x(i+(J+1)·NB) (0≦i≦NB−1) ofa J+1-th block arranged one block after. Then, using Formula (1) below,the time series signal x(i+J·NB) (0≦i≦2NB−1) of J-th block of 2NB (=NT)samples is transformed to NB MDCT spectrum X_(J)(k).

$\begin{matrix}{{{X_{J}(k)} = {\frac{2}{NB}{\sum\limits_{i = 0}^{{2\; {NB}} - 1}\; {{w_{1}(i)}{a\left( {k,i} \right)}{x\left( {i + {J \cdot {NB}}} \right)}}}}}{{a\left( {k,i} \right)} = {\cos \left( \frac{{\pi \left( {{2\; k} + 1} \right)}\left( {{2\; i} + {NB} + 1} \right)}{4\; {NB}} \right)}}\left( {{0 \leq k \leq {{NB} - 1}},{0 \leq i \leq {{2\; {NB}} - 1}}} \right)} & (1)\end{matrix}$

In Formula (1), w₁(i) is a window function of a forward direction.

As above, since the MDCT spectrum X_(J)(k) is subjected to orthogonaltransformation so that the audio signals of adjacent blocks overlap,there is a little block distortion.

The IDCT transformer 14 and the window function multiplier 15 of FIG. 1transform the NB MDCT spectra X_(J)(k) obtained as above to a waveformelement y_(1,J)(i) (0≦i≦2NB−1) of 2NB (=NT) samples using Formula (2)below. Specifically, the IDCT transformer 14 performs multiplication ofthe MDCT spectrum X_(J)(k) and a transform coefficient b(k,i) of Formula(2) below, and the window function multiplier 15 multiplies themultiplication result by a window function w₂(i) in the inversedirection.

$\begin{matrix}{{{y_{1,J}(i)} = {{w_{2}(i)}{\sum\limits_{k = 0}^{{NB} - 1}\; {{b\left( {k,i} \right)}{X_{J}(k)}}}}}{{b\left( {k,i} \right)} = {{\cos \left( \frac{{\pi \left( {{2\; k} + 1} \right)}\left( {{2\; i} + {NB} + 1} \right)}{4\; {NB}} \right)}\left( {{0 \leq k \leq {{NB} - 1}},{0 \leq i \leq {{2\; {NB}} - 1}}} \right)}}} & (2)\end{matrix}$

Then, the adder 17 of FIG. 1 adds the former half of the waveformelement y_(1,J)(i) (0≦i≦NB−1) of the J-th block and the latter half ofthe waveform element y_(1,J−1)(i+NB) (0≦i≦NB−1) of the J−1-th block toobtain a time series signal y(i+J·NB) (0≦i≦NB−1) using Formula (3)below.

y(i+J·NB)=y _(1,J−1)(i+NB)+y _(1,J)(i) (0≦i≦NB−1)   (3)

[Generation Method of Substitute Time Series Signal]

FIGS. 3 to 6 are diagrams illustrating a generation method of asubstitute time series signal. Furthermore, in FIGS. 3 to 6, the solidline indicates a time series signal of a block in which an error doesnot occur during decoding, and the dotted line indicates a time seriessignal of a block in which an error has occurred during decoding.

As shown in FIG. 3, when an error occurs during new decoding in J-thblock, an error does not occur during decoding in J−1-th block which isarranged one block before. Thus, in the time series signal y(i+J·NB)(0≦i≦NB−1) of the J-th block, an error does not occur in the latter halfof the waveform element y_(1,J−1)(i+NB) (0≦i≦NB−1) of the J−1-th block,but an error occurs in the former half of the waveform elementy_(1,J)(i) (0≦i≦NB−1) of the J-th block.

Thus, the correlation calculator 20 first obtains, for each n, across-correlation value R, of the latter half of the waveform elementy_(1,J−1)(i+NB) (0≦i≦NB−1) of the J−1-th block, which is a prior blockof the J-th block in which an error has occurred and the latter half ofa waveform element y_(1,J−1−n)(i+NB) (0≦i≦NB−1) of the J−1−n-th block,which is arranged n blocks before the J−1-th block, by Formula (4)below.

$\begin{matrix}{R_{n} = {\sum\limits_{i = 0}^{{NB} - 1}\; {{{y_{1,{J - 1}}\left( {i + {NB}} \right)} \cdot {y_{1,{J - 1 - n}}\left( {i + {NB}} \right)}}\left( {1 \leq n \leq N} \right)}}} & (4)\end{matrix}$

In addition, the correlation calculator 20 obtains a power value P_(n)of the latter half of a waveform element y_(1,J−1−n)(i+NB) (0≦i≦NB−1) ofthe J−1−n-th block by Formula (5) below.

$\begin{matrix}{P_{n} = {\sum\limits_{i = 0}^{{NB} - 1}\; {\left( {y_{1,{J - 1 - n}}\left( {i + {NB}} \right)} \right)^{2}\left( {1 \leq n \leq N} \right)}}} & (5)\end{matrix}$

Then, the correlation calculator 20 obtains a correlation value C_(n) byFormula (6) below using the cross-correlation value R_(n) and the powervalue P_(n) obtained as above.

$\begin{matrix}{C_{n} = {\frac{R_{n}}{\sqrt{P_{0} \cdot P_{n}}}\left( {1 \leq n \leq N} \right)}} & (6)\end{matrix}$

Next, the evaluation calculator 21 obtains an evaluation value Ev(n) byFormula (7) below added with n that is a block interval, or the likeusing the correlation value C_(n)obtained by the correlation calculator20.

$\begin{matrix}{{{Ev}(n)} = {{a \cdot C_{n}} + {{b \cdot \left( {1 - \frac{n}{N}} \right)}\left( {{0 \leq a},{b \leq 1},{1 \leq n \leq N}} \right)}}} & (7)\end{matrix}$

Furthermore, a formula for obtaining the evaluation value Ev(n) is notlimited to Formula (7).

The evaluation calculator 21 determines n when the evaluation valueEv(n) obtained as above becomes the maximum as the basic cycle n₀ of ablock unit.

Here, the basic cycle of normal audio signals is approximately 2.5 msecto 20 msec, and it is considered that the correlation becomes highwithin a range of n corresponding to 2.5 msec to 20 msec in audiosignals with strong cyclicality. For example, in a case of a short cycleof a block such as 1/750 seconds (1.33 msec), the basic cycle is abouttwo to fifteen times the cycle of a block, and it is considered that thecorrelation becomes high when n is within the range of two to fifteentimes in the audio signals with strong cyclicality. Furthermore, in thiscase, if the number of sampling frequency is assumed to be 48000 Hz, theblock length NB is 64, and the transform block length NT is 128.

As above, since the correlation becomes high within the range of ncorresponding to 2.5 msec to 20 msec in the audio signals with strongcyclicality, the decoding device 10 sets N to be, for example, equal toor higher than the maximum value of n corresponding to 20 msec.

However, when the basic cycle n₀ of a block unit has a relatively largevalue, there is a possibility that the basic cycle n₀ of a block unit isan integral multiple of an actual basic cycle of a block unit. Thus, thecycle adjustor 22 obtains, for each m, a correlation value C_(n0/m)(fractional correlation) of the latter half of the waveform elementy_(1,J−1)(i+NB) (0≦i≦NB−1) of the J−1-th block right before the J-thblock in which an error has occurred and the latter half of a waveformelement y_(1,J−1−n0/m)(i+NB) (0≦i≦NB−1) of the J−1−n₀/m-th block usingthe above-described Formulas (4) to (6) as shown in FIG. 4. Furthermore,m is an integer equal to or higher than 2 and equal to or lower than thebasic cycle n₀ of a unit of blocks, and a waveform elementy_(1,J−1−n0/m)(i+NB) (0≦i≦NB−1) is obtained by Formula (8) below.

$\begin{matrix}{{{z(i)} = {{{w_{1}\left( {i + {NB}} \right)} \cdot {y\left( {{J \cdot {NB}} - \frac{n_{0} \cdot {NB}}{m} + i} \right)}} + {{{w_{1}\left( {{2 \cdot {NB}} - 1 - i} \right)} \cdot {y\left( {{\left( {J + 1} \right) \cdot {NB}} - \frac{n_{0} \cdot {NB}}{m} - i - 1} \right)}}\left( {0 \leq i \leq {{{NB}/2} - 1}} \right)}}}{{y_{1,{J - 1 - {n\; {0/m}}}}\left( {i + {NB}} \right)} = {{{w_{2}\left( {i + {NB}} \right)} \cdot {z\left( {{{NB}/2} - 1 - i} \right)}}\left( {0 \leq i \leq {{{NB}/2} - 1}} \right)}}{{y_{1,{J - 1 - {n\; {0/m}}}}\left( {i + {3 \cdot {{NB}/2}}} \right)} = {{{w_{2}\left( {i + {3 \cdot {{NB}/2}}} \right)} \cdot {z(i)}}\left( {0 \leq i \leq {{{NB}/2} - 1}} \right)}}} & (8)\end{matrix}$

Then, the cycle adjustor 22 corrects the basic cycle n₀ of a block unitto n₀/m₀ by setting the ratio m₀ to m when a correlation value C_(n0/m)has the maximum value when the correlation value C_(n0/m) is higher thanthe correlation value C_(n0). On the other hand, when the correlationvalue C_(n0/m) is not higher than the correlation value C_(n0), thecycle adjustor 22 sets the ratio m₀ to 1 and does not correct the basiccycle of a block unit.

In addition, when the evaluation value Ev(n₀) of the basic cycle n₀ of ablock unit has a relatively small value, it is considered that thecyclicality of the audio signals is low, or there is deviation betweenthe basic cycle and a cycle of a block. Thus, as shown in FIG. 5, thecycle adjustor 22 obtains the latter half of a waveform elementy″_(1,J−1−n0)(i+NB) (0≦i≦NB−1) of a J−1−n₀-th block from a time seriessignal y(i+(J−n₀)NB−D) (0≦i≦NB−1) of a block deviated forward from theJ−1−n₀-th block by D sample, for each D, by Formula (9) below.

z(i)=w ₁(i+NB)·y(i+(J−n ₀)·NB−D)+w ₁(2·NB−1−i)·y((J−n ₀+1)·NB−i−1−D)(0≦i≦NB/2−1) y″ ^(1,J−1−n) ₀ (i+NB)=w ₂(i+NB)·z(NB/2−1−i) (0≦i≦NB/2−1)y″_(1,J−1−n) ₀ (i+3·NB/2)=w ₂(i+3·NB/2)·z(i) (0≦i≦NB/2−1)   (9)

Then, the cycle adjustor 22 obtains, for each D, a correlation valueC_(n0,D) (deviation correlation) of the waveform element y″_(1,J−1−n0)(i+NB) (0≦i≦NB−1) of the latter half obtained for each D by Formula (9)and the latter half of the waveform element y_(1,J−1)(i+NB) (0≦i≦NB−1)of the J−1-th block using the same formula as the above-describedFormulas (4) to (6).

The cycle adjustor 22 obtains D when the correlation value C_(n0,D) hasthe maximum value as a deviation amount D₀ when the correlation valueC_(n0,D) is higher than the correlation value C_(n0). On the other hand,when the correlation value C_(n0,D) is not higher than the correlationvalue C_(n0), the cycle adjustor 22 sets the deviation amount D₀ to 0.

As above, if the basic cycle n₀ of a block unit, the ratio m₀, and thedeviation amount D₀ are decided, the gain adjustor 23 generates thesubstitute waveform element y′_(1,J)(i) (0≦i≦NB−1) of the latter half ofthe waveform element y_(1,J)(i) (0≦i≦NB−1) of the J-th block in which anerror has occurred during decoding by Formula (10) below.

$\begin{matrix}{{{y_{1,J^{\prime}}(i)} = {{g \cdot {y_{1,{J - {n\; {0/m}\; 0}}}(i)}}\left( {0 \leq i \leq {{NB} - 1}} \right)\left( {{{when}\mspace{14mu} D} = 0} \right)}}{{y_{1,J^{\prime}}(i)} = {{g \cdot {y_{1,{J - {n\; {0/m}\; 0}}}^{''}(i)}}\left( {0 \leq i \leq {{NB} - 1}} \right)\left( {{{when}\mspace{14mu} D} \neq 0} \right)}}{g = \frac{R_{n\; 0}}{P_{n\; 0}}}} & (10)\end{matrix}$

Then, the adder 17 obtains a substitute time series signal y′(i+J·NB)(0≦i≦NB−1) of a time series signal y(i+J·NB) (0≦i≦NB−1) by Formula (11)below. The substitute time series signal y′(i+J·NB) (0≦i≦NB−1) is outputas the time series signal y(i+J·NB) (0≦i≦NB−1).

y′(i+J·NB)=α(i)·(y _(1,J−1)(i+NB)+y _(1,J)′(i)) (0≦i≦NB−1)   (11)

Furthermore, in Formula (11), α(i) is 1 when an error has newly occurredduring decoding and is an attenuation coefficient which approaches 0 asthe length of a period in which an error keeps occurring thereafterbecomes longer.

Next, a case will be described, in which an error occurs in J+1-th blocknext to the J-th block during decoding.

In this case, the gain adjustor 23 generates a substitute waveformelement y′_(1,J+1)(i) (0≦i≦NB−1) of a waveform element y_(1,J+1)(i)(0≦i≦NB−1) from the waveform element y_(1,J+1−n0/m0)(i) (0≦i≦NB−1) of aJ−n₀/m₀+1-th block next to the block of the waveform element used forgenerating the substitute waveform element y′_(1,J)(i) (0≦i≦NB−1) or awaveform element y″_(1,J+1−n0/m0)(i) (0≦i≦NB−1) with Formula (10)described above, based on the basic cycle n₀ of a block unit of the J-thblock, the ratio m₀, and the deviation amount D₀.

In addition, the gain adjustor 23 generates a substitute waveformelement y′_(1,J)(i+NB) (0≦i≦NB−1) of a waveform element y_(1,J)(i+NB)(0≦i≦NB−1) from the waveform element y_(1,J−n0/m0)(i+NB) (0≦i≦NB−1) of aJ−n₀/m₀-th block by the same formula as the above-described Formula(10).

Then, the adder 17 adds the substitute waveform element y′_(1,J)(i+NB)(0≦i≦NB−1) to the substitute waveform element y′_(1,J+1)(i) (0≦i≦NB−1)by the same formula as Formula (11) described above, and causes theresult to attenuate to the attenuation coefficient α(i) approaching 0further than in the time of generating the substitute time series signaly′(i+J·NB) (0≦i≦NB−1). A substitute time series signal y′(i+(J+1)·NB)(0≦i≦NB−1) obtained from the result is output as a time series signaly(i+(J+1)·NB) (0≦i≦NB−1).

In the same manner as above, thereafter, as long as errors keepoccurring, a waveform element used in generation of a substitutewaveform element is decided based on the basic cycle n₀ of a block unitof the J-th block, the ratio m₀, and the deviation amount D₀. Then, thegenerated substitute waveform elements in the former and latter halvesof adjacent blocks are added, and the result is more attenuated than inthe previous addition.

Next, as shown in FIG. 6, a case will be described, in which an errordoes not occur in the J-th block.

In this case, an error occurs in the J−1-th block arranged one blockbefore. Accordingly, in the time series signal y(i+J·NB) (0≦i≦NB−1) ofthe J-th block, an error has not occurred in the former half of thewaveform element y_(1,J)(i) (0≦i≦NB−1) of the J-th block, but an errorhas occurred in the latter half of the waveform element y_(1,J−1)(i+NB)(0≦i≦NB−1) of the J−1-th block.

Hence, the gain adjustor 23 generates the substitute waveform elementy′_(1,J−1)(i+NB) (0≦i≦NB−1) of the waveform element y_(1,J−1)(i+NB)(0≦i≦NB−1) from a waveform element y_(1,J−2−n0/m0)(i+NB) (0≦i≦NB−1) usedin the generation of a substitute waveform element y′_(1,J−2)(i+NB)(0≦i≦NB−1), the latter half of a waveform element y_(1,J−1−n0/m0)(i+NB)(0≦i≦NB−1) of a block next to the block of the waveform elementy″_(1,J−1−n0/m0)(i+NB) (0≦i≦NB−1), or the waveform elementy″_(1,J−1−n0/m0)(i+NB) (0≦i≦NB−1) by the above-described Formula (10)based on the basic cycle n₀ of a block unit of a block in which an errorstarts occurring, the ratio m₀, and the deviation amount D₀.

Then, the adder 17 obtains the substitute time series signal y′(i+J·NB)(0≦i≦NB−1) of the time series signal y(i+J·NB) (0≦i≦NB−1) by Formula(12) below. The substitute time series signal y′(i+J·NB) (0≦i≦NB−1) isoutput as the time series signal y(i+J·NB) (0≦i≦NB−1).

y′(i+J·NB)=β(i)·(y′ _(1,J−1)(i+NB)+y _(1,J)(i)) (0≦i≦NB−1)   (12)

Furthermore, in Formula (12), β(i) is an attenuation coefficient whichapproaches 1 from the prior attenuation coefficient α(i).

[Description of Process of Decoding Device]

FIG. 7 is a flowchart illustrating a decoding process of the decodingdevice 10 of FIG. 1. The decoding process starts when, for example, apacket of encoded data is input to the decoding device 10. Furthermore,the initial value of errCnt is 0.

In Step S11 of FIG. 7, the demultiplexer 11 performs demultiplexing forthe input packet of the encoded data and extracts the encoded data.

In Step S12, the demultiplexer 11 determines whether or not an error ora loss occurs in the packet. When it is determined that an error or aloss has not occurred in the packet in Step S12, the demultiplexer 11sets errFlag to be supplied to the switch 16, the adder 17, the countercontroller 18, and the correlation calculator 20 to 0 in Step S13. Inaddition, the demultiplexer 11 supplies the encoded data extracted inStep S11 to the parameter parser 12.

In Step S14, the parameter parser 12 extracts an encoded spectrum ofaudio signals from the encoded data supplied from the demultiplexer 11.

In Step S15, the parameter parser 12 determines whether or not anextraction error has occurred. When it is determined that an extractionerror has not occurred in Step S15, the parameter parser 12 sets errFlagto be supplied to the switch 16, the adder 17, the counter controller18, and the correlation calculator 20 to 0 in Step S16. In addition, theparameter parser 12 supplies the extracted encoded spectrum to thespectrum decoder 13.

In Step S17, the spectrum decoder 13 decodes the encoded spectrumsupplied from the parameter parser 12. The spectrum decoder 13 suppliesMDCT spectra X_(J)(k) (0≦k≦NB−1) obtained from the result to the IDCTtransformer 14.

In Step S18, the IDCT transformer 14 performs IDCT for the MDCT spectraX_(J)(k) supplied from the spectrum decoder 13, and supplies the timeseries signal obtained from the result to the window function multiplier15.

In Step S19, the window function multiplier 15 multiplies the timeseries signal supplied from the IDCT transformer 14 by a window functionin the inverse direction.

In Step S20, the window function multiplier 15 supplies the time seriessignal of a block unit obtained from the result of the process in StepS19 to the memory 19 as the waveform element y_(1,J)(i) (0≦i≦2NB−1) andstores the signal. The waveform element y_(1,J)(i) (0≦i≦2NB−1) is alsosupplied to the switch 16, and the switch 16 selects the waveformelement y_(1,J)(i) (0≦i≦2NB−1) and supplies the element to the adder 17.

In Step S21, the counter controller 18 determines whether or not errCntis 0. When it is determined that the errCnt is 0 in Step S21, theprocess advances to Step S22.

In Step S22, the adder 17 adds the former half of the waveform elementy_(1,J)(i) (0≦i≦NB−1) in the waveform element y_(1,J)(i) (0≦i≦NB−1)supplied from the switch 16 to the latter half of the waveform elementy_(1,J−1)(i+NB) (0≦i≦NB−1) which is arranged one block before stored inthe memory 19 as shown in Formula (3) described above.

In Step S23, the adder 17 outputs the time series signal y(i+J·NB)(0≦i≦NB−1) obtained from the result of the process in Step S22, andsupplies the signal to the memory 19 so as to be stored thereon to endthe process.

On the other hand, when it is determined that an error or a loss in thepacket has occurred in Step S12, the demultiplexer 11 sets errFlag to besupplied to the switch 16, the adder 17, the counter controller 18, andthe correlation calculator 20 to 1 in Step S24. Then, the processadvances to Step S26.

In addition, when it is determined that an extraction error has occurredin Step S15, the parameter parser 12 sets errFlag to be supplied to theswitch 16, the adder 17, the counter controller 18, and the correlationcalculator 20 to 0 and the process advances to Step S26.

In Step S26, the counter controller 18 determines whether or not errCntis 0. When it is determined that the errCnt is 0 in Step S26, in otherwords, when occurrence of a new error is detected, the countercontroller 18 sets the errCnt to 1 in Step S27.

In Step S28, the decoding device 10 performs a substitute waveformelement generation process for generating a substitute waveform elementy′_(1,J)(i) (0≦i≦NB−1). Details of the substitute waveform elementgeneration process will be described with reference to FIG. 8 later.

In Step S29, the adder 17 adds the substitute waveform elementy′_(1,J)(i) (0≦i≦NB−1) supplied from the switch 16 as the result of theprocess in Step S28 to the waveform element y_(1,J−1)(i+NB) (0≦i≦NB−1)of one block before stored in the memory 19.

In Step S30, the adder 17 generates a substitute time series signaly′(i+J·NB) (0≦i≦NB−1) using the addition value obtained by the processin Step S29 and the attenuation coefficient α(i) as shown in Formula(11) described above. The adder 17 outputs the substitute time seriessignal y′(i+J·NB) (0≦i≦NB−1) as a time series signal y(i+J·NB)(0≦i≦NB−1) to supply to the memory 19 to store the signal, and theprocess ends.

On the other hand, when it is determined that the errCnt is not 0 inStep S26, in other words, when occurrence of errors is continuouslydetected, the counter controller 18 increases the errCnt by one in StepS31.

In Step S32, the gain adjustor 23 generates a substitute waveformelement y′_(1,J)(i) (0≦i≦NB−1) with the same formula as Formula (10)described above, using the waveform element of the next block to theblock of the waveform element y″_(1,J−1−n0/m0)(i) (0≦i≦NB−1) or thewaveform element y_(1,J−1−n0/m0)(i) (0≦i≦NB−1) used in the generation ofthe substitute waveform element y′_(1,J−1)(i) (0≦i≦NB−1) of the previoustime, and causes the memory 19 to store the result. In addition, thegain adjustor 23 generates a substitute waveform element y′_(1,J−1)(i)(0≦i≦NB−1) with the same formula as Formula (10) described above, usingthe latter half of the waveform element of the block of the waveformelement y″_(1,J−1−n0/m0)(i) (0≦i≦NB−1) or the waveform element(0≦i≦NB−1), and causes the memory 19 to store the result.

In Step S33, the adder 17 adds the substitute waveform elementy′_(1,J−1)(i+NB) (0≦i≦NB−1) stored in the memory 19 and the substitutewaveform element y′_(1,J)(i) (0≦i≦NB−1).

In Step S34, the adder 17 generates a substitute time series signaly′(i+J·NB) (0≦i≦NB−1) using the attenuation coefficient α(i) approaching0 from the generation of the substitute time series signaly′(i+(J−1)·NB) (0≦i≦NB−1) in the same formula as Formula (11) describedabove. Then, the adder 17 outputs the substitute time series signaly′(i+J·NB) (0≦i≦NB−1) as a time series signal y(i+J·NB) (0≦i≦NB−1), andsupplies the signal to the memory 19 to cause the memory 19 to store thesignal, and the process ends.

In addition, when it is determined that the errCnt is not 0 in Step S21,in other words, when the occurrence of an error is not detected, theprocess advances to Step S35. In Step S35, the counter controller 18sets the errCnt to 0.

In Step S36, the gain adjustor 23 generates a substitute waveformelement y′_(1,J−1)(i+NB) (0≦i≦NB−1) using the latter half of thewaveform element of a block next to the block of the waveform elementy_(1,J−2−n0/m0)(i+NB) (0≦i≦NB−1) or the waveform elementy_(1,J−2−n0/m0)(i+NB) (0≦i≦NB−1) used in the generation of thesubstitute waveform element y_(1,J−2)(i+NB) (0≦i≦NB−1), and causes thememory 19 to store the result.

In Step S37, the adder 17 adds the substitute waveform elementy′_(1,J−1)(i+NB) (0≦i≦NB−1) of one block before stored in the memory 19to the former half of the waveform element y_(1,J)(i) (0≦i≦NB−1) in thewaveform element y_(1,J)(i) (0≦i≦2NB−1) supplied through the switch 16.

In Step S38, the adder 17 generates a substitute time series signaly′(i+J·NB) (0≦i≦NB−1) using the addition value obtained from the processin Step S37 and the attenuation coefficient β(i) as in Formula (12)described above. Then, the adder 17 outputs the substitute time seriessignal y′(i+J·NB) as a time series signal y(i+J·NB) (0≦i≦NB−1), andsupplies the signal to the memory 19 to cause the memory 19 to store thesignal. Then, the process ends.

Furthermore, the processes in Steps S14 to S23 and Steps S25 to S38 ofFIG. 7 are performed in a unit of blocks.

FIG. 8 is a flowchart illustrating the substitute waveform elementgeneration process of Step S28 of FIG. 7 in detail.

In Step S51 of FIG. 8, the correlation calculator 20 reads, from thememory 19, the latter half of the waveform element y_(1,J−1)(i+NB)(0≦i≦NB−1) of a block prior to the block in which an error occurs andthe latter half of the waveform element y_(1,J−1−n)(i+NB) (1≦n≦N)(0≦i≦NB−1) of a block arranged n blocks before the above block.

In Step S52, the correlation calculator 20 obtains a correlation valueC_(n) using the read waveform element y_(1,J−1)(i+NB) (0≦i≦NB−1) andwaveform element y_(1,J−1−n)(i+NB) (0≦i≦NB−1) by the above-describedFormulas (4) to (6), and supplies the result to the evaluationcalculator 21.

In Step S53, the evaluation calculator 21 obtains an evaluation valueEv(n) using the correlation value C_(n) supplied from the correlationcalculator 20 by Formula (7) described above. Then, the evaluationcalculator 21 decides n when the evaluation value Ev(n) is at themaximum for the basic cycle n₀ of a block unit, and supplies the resultto the memory 19 and the cycle adjustor 22. In addition, the evaluationcalculator 21 supplies evaluation value Ev(n₀) and correlation valueC_(n0) to the cycle adjustor 22.

In Step S54, the cycle adjustor 22 determines whether or not theevaluation value Ev(n₀) supplied from the evaluation calculator 21 isequal to or greater than a threshold value TH_(EV). When it isdetermined that the evaluation value Ev(n₀) is equal to or greater thana threshold value TH_(EV) in Step S54, the process advances to Step S55.

In Step S55, the cycle adjustor 22 sets a candidate m of a ratio m₀ to2, sets the ratio m₀ to 1, and sets a maximum value MC_(n0/m) of acorrelation value C_(n0/m) to the correlation value C_(n0) supplied fromthe evaluation calculator 21.

In Step S56, the cycle adjustor 22 determines whether or not n₀/m isgreater than 1, in other words, n₀ is greater than m. When it isdetermined that n₀/m is greater than 1 in Step S56, the process advancesto Step S57.

In Step S57, the cycle adjustor 22 obtains the latter half of thewaveform element y_(1,J−1−n0/m) (i+NB) (0≦i≦NB−1) of a block arrangedn₀/m blocks before the block of the waveform element y_(1,J−1)(i+NB)(0≦i≦NB−1) by Formula (8) described above using a time series signaly((i+J·NB−n₀·NB/m) (0≦i≦NB−1) read from the memory 19. In addition, thecycle adjustor 22 reads the waveform element y_(1,J−1)(i+NB) (0≦i≦NB−1)from the memory 19.

In Step S58, the cycle adjustor 22 obtains a correlation value C_(n0/m)using the waveform element y_(1,J−1)(i+NB) (0≦i≦NB−1) and waveformelement y_(1,J−1−n0/m) (i+NB) (0≦i≦NB−1) by Formulas (4) to (6)described above.

In Step S59, the cycle adjustor 22 determines whether or not thecorrelation value C_(n0/m) of the candidate m obtained in Step S58 isgreater than the maximum value MC_(n0/m). When it is determined that thecorrelation value C_(n0/m) of the candidate m is greater than themaximum value MC_(n0/m) in Step S59, the process advances to Step S60.

In Step S60, the cycle adjustor 22 sets the maximum value MC_(n0/m) tothe correlation value C_(n0/m) of the candidate m, and the ratio m₀ tothe candidate m. Then, the process advances to Step S61.

On the other hand, when it is determined that the correlation valueC_(n0/m) of the candidate m is not greater than the maximum valueMC_(n0/m) in Step S59, the maximum value MC_(n0/m) does not change, andthe process advances to Step S61.

In Step S61, the cycle adjustor 22 increases the candidate m by one, andthe process returns to Step S56. Then, processes of Steps S56 to S61 areperformed until n₀/m becomes equal to or less than 1.

When it is determined that n₀/m is not greater than 1 in Step S56, thecycle adjustor 22 sets the deviation amount D₀ to 0, supplies thedeviation amount D₀ and the ratio m₀ to the memory 19, and causes thememory to store the values. Then, in Step S62, the gain adjustor 23obtains the former half of a waveform element y_(1,J−n0/m0)(i)(0≦i≦NB−1) of a block arranged n₀/m₀ blocks before using Formula (13)below, generates a substitute waveform element y′_(1,J)(i) (0≦i≦NB−1) byFormula (10) described above, and causes the memory 19 to store theresult. Then, the process returns to Step S28 of FIG. 7, and then theprocess advances to Step S29.

$\begin{matrix}{{{y_{1,{J - {n\; {0/m}\; 0}}}(i)} = {{y\left( {{J \cdot {NB}} - \frac{n_{0} \cdot {NB}}{m_{0}} + i} \right)} - {y_{1,{J - 1 - {n\; {0/m}\; 0}}}\left( {i + {NB}} \right)}}}\left( {0 \leq i \leq {{NB} - 1}} \right)} & (13)\end{matrix}$

On the other hand, when it is determined that the evaluation valueEv(n₀) is not equal to or greater than a threshold value TH_(EV) in StepS54, the process advances to Step S63. In Step S63, the cycle adjustor22 sets a candidate D of the deviation amount D₀ to a minimum valueD_(min) decided in advance, sets the deviation amount D₀ to 0, and setsa maximum value MC_(n0,D)of a correlation value C_(n0,D) to thecorrelation value C_(n0) supplied from the evaluation calculator 21.

In Step S64, the cycle adjustor 22 determines whether or not thecandidate D is equal to or less than a maximum value D_(max) decided inadvance. When it is determined that the candidate D is equal to or lessthan the maximum value D_(max) in Step S64, the process advances to StepS65.

In Step S65, the cycle adjustor 22 obtains a waveform elementy″_(1,J−1−n0)(i+NB) (0≦i≦NB−1) from a time series signal y(i+(J−n₀)NB−D)(0≦i≦NB−1) of a block which is stored in the memory 19 and deviatedforward from a J−1−n₀-th block by the candidate D sample by Formula (9)described above.

In Step S66, the cycle adjustor 22 obtains the correlation valueC_(n0,D) of the waveform element y″_(1,J−1−n0)(i+NB) (0≦i≦NB−1) and thewaveform element y_(1,J−1)(i+NB) (0≦i≦NB−1) stored in the memory 19 bythe same formulas as Formulas (4) to (6) described above.

In Step S67, the cycle adjustor 22 determines whether or not thecorrelation value C_(n0,D) of the candidate D obtained in Step S66 isgreater than the maximum value MC_(n0,D). When it is determined that thecorrelation value C_(n0,D) of the candidate D is greater than themaximum value MC_(n0,D) in Step S67, the process advances to Step S68.

In Step S68, the cycle adjustor 22 sets the maximum value MC_(n0,D) tothe correlation value C_(n0,D) of the candidate D, and sets thedeviation amount D₀ to the candidate D. Then, the process advances toStep S69.

On the other hand, when it is determined that the correlation valueC_(n0,D) of the candidate D is not greater than the maximum valueMC_(n0,D) in Step S67, the maximum value MC_(n0,D) does not change, andthe process advances to Step S69.

In Step S69, the cycle adjustor 22 increases the candidate D by apredetermined value D_(w) decided in advance, and the process returns toStep S64. Then, processes of Steps S64 to S69 are performed until thecandidate D becomes greater than the maximum value D_(max).

When it is determined that the candidate D is greater than the maximumvalue D_(max) in Step S64, the cycle adjustor 22 sets the ratio m₀ to 1,supplies the ratio m₀ and the deviation amount D₀ to the memory 19 tocause the memory 19 to store the values.

Then, in Step S70, the gain adjustor 23 generates a substitute waveformelement y′_(1,J)(i) (0≦i≦NB−1) by Formula (10) described above using thewaveform element y″_(1,J−n0)(i) (0≦i≦NB−1) of a block deviated forwardfrom a J−n₀-th block by a deviation amount D₀ sample, and causes thememory 19 to store the result. Furthermore, the gain adjustor 23 obtainsa waveform element y″_(1,J−n0)(i+NB) (0≦i≦NB−1) from a time seriessignal y(i+(J+1−n₀)NB−D) (0≦i≦NB−1) of a block deviated forward from theJ−n₀-th block by the deviation amount D₀ sample, stored in the memory19, with the same formula as the above-described Formula (9).

After the process of Step S70, the process returns to Step S28 of FIG.7, and then the process advances to Step S29.

As above, the decoding device 10 obtains the basic cycle of a block inwhich an error has occurred in a unit of blocks based on the correlationvalue of the waveform element of the block arranged immediately beforethe block in which an error has occurred and the waveform element of theblock arranged n blocks before the above block. Accordingly, the abovemethod is better because the amount of arithmetical operations forobtaining the basic cycle is smaller than the case where the basic cycleis obtained in a unit of sample. As a result, it is possible that asubstitute waveform element may be generated from the waveform elementof the past based on the basic cycle, and a substitute time seriessignal with little incompatibility caused by unpleasant strange noisesis easily generated.

In addition, when there is deviation between the basic cycle and thecycle of a block and the evaluation value EV(n₀) is lower than thethreshold value Ev_(TH), the decoding device 10 obtains the deviationamount using a time series signal, which has already been decoded, inthe vicinity of a block which is a block arranged by the basic cyclen₀-number of blocks of a block unit in front. Therefore, it is possibleto more correctly calculate a basic cycle at a relatively high speed.

Furthermore, the decoding device 10 obtains a correlation value C_(n0/m)of a basic cycle n₀/m of a block unit when the basic cycle n₀ of theblock unit is greater than 2, and corrects the basic cycle n₀ of theblock unit to the basic cycle n₀/m of the block unit when thecorrelation value C_(n0/m) is greater than the correlation value C_(n0).Thus, it is possible to prevent integer multiple of an actual basiccycle from being calculated as a basic cycle of a block unit.

[Description of Computer to Which the Disclosure is Applied]

Next, a series of processes described above can be performed byhardware, and also by software. When the series of processes isperformed by software, a program which constitutes the software isinstalled in a general-purpose computer, or the like.

Hence, FIG. 9 shows a configuration example of an embodiment of acomputer in which a program executing the above-described series ofprocesses is installed.

The program can be recorded in a storage unit 208 or a ROM (Read OnlyMemory) 202 in advance as a recording medium mounted in the computer.

Alternatively, the program can be stored (recorded) in a removablemedium 211. Such a removable medium 211 can be provided as so-calledpackage software. Herein, as the removable medium 211, there are, forexample, a flexible disk, a CD-ROM (Compact Disc Read Only Memory), anMO (Magneto Optical) disc, a DVD (Digital Versatile Disc), a magneticdisk, a semiconductor memory, and the like.

Furthermore, the program can be installed in the computer through adrive 210 from the above-described removable medium 211, or downloadedin the computer through a communication network or a broadcastingnetwork, and installed in the internal storage unit 208. In other words,the program can be wirelessly transmitted to the computer, for example,through an artificial satellite for digital satellite broadcasting froma downloading site, or transmitted with wires to the computer through anetwork such as a LAN (Local Area Network), or the Internet.

The computer includes a CPU (Central Processing Unit) 201, and the CPU201 is connected to an input and output interface 205 through a bus 204.

The CPU 201 executes programs stored in the ROM 202 according to aninstruction when a user inputs such instruction by operating an inputunit 206 through the input and output interface 205, or the like.Alternatively, the CPU 201 executes programs stored in the storage unit208 by loading them in a RAM (Random Access Memory) 203.

Accordingly, the CPU 201 performs processes according to theabove-described flowcharts, or processes according to the configurationsof the above-described block diagrams. In addition, the CPU 201 causesan output unit 207 to perform outputting, a communication unit 209 toperform transmission, or the storage unit 208 to perform recording theresults of the processes through, for example, the input and outputinterface 205 as necessity.

Furthermore, the input unit 206 includes a keyboard, a mouse, amicrophone, or the like. In addition, the output unit 207 includes anLCD (Liquid Crystal Display), a speaker, or the like.

In the present specification here, processes performed by a computerwith a program are not necessarily performed in time series in the orderdescribed in the flowcharts. In other words, the processes performed bya computer with a program include processes executed in parallel orindividually (for example, parallel processes or processes by objects).

In addition, the program may perform processes using one computer(processor), or perform distributed processes using a plurality ofcomputers. Furthermore, the program may be transmitted to and executedby a remote computer.

The present disclosure is particularly effective when the length of ablock is relatively short.

The present disclosure contains subject matter related to that disclosedin Japanese Priority Patent Application JP 2010-263807 filed in theJapan Patent Office on Nov. 26, 2010, the entire contents of which arehereby incorporated by reference.

It should be understood by those skilled in the art that variousmodifications, combinations, sub-combinations and alterations may occurdepending on design requirements and other factors insofar as they arewithin the scope of the appended claims or the equivalents thereof.

1. A decoding device comprising: a decoding unit which decodes encodeddata obtained after audio signals of adjacent blocks are overlapped,undergo orthogonal transformation, and encoded; an inverse orthogonaltransformation unit which performs inverse orthogonal transformation forthe encoded data that has been decoded by the decoding unit and obtainsa time series waveform element in a unit of block; a correlationcalculation unit which obtains a correlation between a time serieswaveform element of a block arranged immediately before an error blockwhich is a block in which an error has occurred during decoding by thedecoding unit and a time series waveform element of a block arranged apredetermined number of blocks before the block; a cycle calculationunit which obtains a basic cycle of a block unit of the error blockbased on the correlation obtained by the correlation calculation unit;and a generation unit which generates a substitute signal of the timeseries waveform element of the error block using the time serieswaveform element of the block arranged forward from the error block by abasic cycle of the block unit based on the basic cycle obtained by thecycle calculation unit.
 2. The decoding device according to claim 1,wherein the cycle calculation unit calculates an evaluation value of theblock arranged forward from the block immediately before the error blockby the predetermined number of blocks for each of the predeterminednumber based on the correlation, and obtains the predetermined numberwhen the evaluation value is at the maximum value as a basic cycle ofthe block unit.
 3. The decoding device according to claim 2, furthercomprising: a cycle adjustment unit which obtains a correlation betweena time series waveform element of a block which is deviated by apredetermined number of samples from a block arranged forward from theblock immediately before the error block by the predetermined number ofblocks when the evaluation value is at the maximum value and the timeseries waveform element of the block immediately before the error blockfor the predetermined number of samples as deviation correlation whenthe maximum value of the evaluation value is smaller than apredetermined threshold value, and obtains the predetermined number ofsamples when the deviation correlation is at the maximum value as adeviation amount of a basic cycle of the error block for a cycle of theblock in a case where the deviation correlation is greater than thecorrelation obtained by the correlation calculation unit, wherein thegeneration unit generates the substitute signal using a time serieswaveform element of a block arranged forward from the error block by thedeviation amount and the basic cycle of the block unit based on thedeviation amount and the basic cycle of the block unit when thedeviation correlation is greater than the correlation obtained by thecorrelation calculation unit.
 4. The decoding device according to claim2, further comprising: a cycle adjustment unit which obtains acorrelation between the time series waveform element of the blockarranged forward from the block immediately before the error block by1/m (m is an integer equal to or higher than 2 and equal to or lowerthan the basic cycle of the block unit) times of the basic cycle of theblock unit and the time series waveform element of the block immediatelybefore the error block for each m as fractional correlation when themaximum value of the evaluation value is equal to or greater than apredetermined threshold value, and corrects the basic cycle of the blockunit to the 1/m times when the fractional correlation is at the maximumvalue when the fractional correlation is greater than the correlationobtained by the correlation calculation unit, wherein the generationunit generates the substitute signal using the time series waveformelement of the block arranged forward from the error block by the basiccycle based on the basic cycle of the block unit after the correction ofthe cycle adjustment unit when the fractional correlation is greaterthan the correlation obtained by the correlation calculation unit. 5.The decoding device according to claim 1, wherein the generation unitgenerates a substitute signal of a time series waveform element of ablock next to the error block using a time series waveform element of ablock next to the block arranged forward from the error block by thebasic cycle of the block unit when an error occurs during decoding ofthe block next to the error block.
 6. The decoding device according toclaim 5, wherein the generation unit attenuates the substitute signalaccording to a period in which occurrence of the error continues.
 7. Thedecoding device according to claim 1, further comprising: an additionunit which adds the latter half of the time series waveform element ofthe block and the former half of a time series waveform element of ablock arranged by one block after the block, the addition unit adds asubstitute signal of the latter half of the time series waveform elementof the error block and the former half of the time series waveformelement of the block next to the error block obtained by the inverseorthogonal transformation unit when an error does not occur duringdecoding of the block next to the error block.
 8. The decoding deviceaccording to claim 1 further comprising: a storage unit which stores thetime series waveform element obtained by the inverse orthogonaltransformation unit.
 9. The decoding device according to claim 8,wherein the storage unit stores the time series waveform elementcompressed in a predetermined compression form.
 10. A decoding method bya decoding device comprising: decoding encoded data obtained after audiosignals of adjacent blocks are overlapped, undergo orthogonaltransformation, and encoded; performing inverse orthogonaltransformation for the encoded data that has been decoded by thedecoding of the encoded data to obtain a time series waveform element ina unit of block; obtaining a correlation between a time series waveformelement of a block arranged immediately before an error block which is ablock in which an error has occurred during decoding by the decoding ofthe encoded data and a time series waveform element of a block arrangedforward from the block by a predetermined number of blocks; obtaining abasic cycle of a block unit of the error block based on the correlationobtained by the obtaining of the correlation; and generating asubstitute signal of the time series waveform element of the error blockusing the time series waveform element of the block arranged forwardfrom the error block by a basic cycle of the block unit based on thebasic cycle obtained by the obtaining of the basic cycle.
 11. A programwhich causes a computer to perform processes including: decoding encodeddata obtained after audio signals of adjacent blocks are overlapped,undergo orthogonal transformation, and encoded; performing inverseorthogonal transformation for the encoded data that has been decoded bythe decoding of the encoded data to obtain a time series waveformelement in a unit of block; obtaining a correlation between a timeseries waveform element of a block arranged immediately before an errorblock which is a block in which an error has occurred during decoding bythe decoding of the encoded data and a time series waveform element of ablock arranged forward from the block by a predetermined number ofblocks; obtaining a basic cycle of a block unit of the error block basedon the correlation obtained by the obtaining of the correlation; andgenerating a substitute signal of the time series waveform element ofthe error block using the time series waveform element of the blockarranged forward from the error block by a basic cycle of the block unitbased on the basic cycle obtained by the obtaining of the basic cycle.